using System;
using System.Collections.Generic;
using System.Text;

using Microsoft.SharePoint;
using Microsoft.SharePoint.Utilities;
using Microsoft.SharePoint.WebControls;
using Microsoft.SharePoint.Publishing.WebControls;
using Microsoft.SharePoint.Publishing.Fields;

namespace Microsoft.SDK.SharePointServer.Samples
{
    public class MediaPlayerField : SPFieldUrl
    {
        public MediaPlayerField(SPFieldCollection fields, string fieldName)
            : base(fields, fieldName)
        {
        }

        public MediaPlayerField(SPFieldCollection fields, string typeName, string displayName)
            : base(fields, typeName, displayName)
        {
        }

        public override BaseFieldControl FieldRenderingControl
        {
            get
            {
                return new MediaPlayerFieldControl(Convert.ToInt32(this.GetCustomProperty("Height")), Convert.ToInt32(this.GetCustomProperty("Width")), (bool)this.GetCustomProperty("Autostart"), (bool)this.GetCustomProperty("AllowExternalUrls"));
            }
        }
    }
}
